package com.fushenlan.epidemicControl.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.fushenlan.dto.*;
import com.fushenlan.po.NucleinDetectionApplyRecord;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.poi.ss.formula.functions.T;

import java.util.List;
import java.util.Map;

/**
* @author Administrator
* @description 针对表【nuclein_detection_apply_record(核酸检测申请记录表)】的数据库操作Mapper
* @createDate 2022-04-20 22:33:26
* @Entity generator.domain.NucleinDetectionApplyRecord
*/
public interface NucleinDetectionApplyRecordMapper extends BaseMapper<NucleinDetectionApplyRecord> {


    List<PersonalDetectionDTO> selectDetectionList(Long userId);

    List<PersonalDetectionResultRespDTO> personalDetectionResult(Long id, Long recordId);

    List<DetectionDayDTO> selectCommunityDetectionInfo(Long userId);
    //查出当前小区当次核酸检测结果未登记人数 登记未检测人数 结果为阳性人数 对应数据
    Map<String,Long> selectNotRegisterNum(Long detectionId, Long communityId);

    //查询该小区下所有累计未转运 累计已转运   累计阳性
    NeighborhoodDetectionCensusRespDTO selectDetectionNum(Long userId, Long communityId);

//    未转运信息汇总人员查找
    List<PersonalInfoRespDTO> notTransportCensus(Long userId, String name, Long communityId,Integer status);

    List<DetectionDayDTO> selectCommunityDetectionAllInfo(Long communityId);

    //小区单次核酸检测记录 未检测
    IPage<PersonalInfoRespDTO> notDetectionPeople(Page<T> p, Long detectionId, Long communityId, String name);

    //小区单次核酸检测记录 未登记
    IPage<PersonalInfoRespDTO> registerPeople(Page<T> p, Long detectionId, Long communityId, String name, Integer status);

    //小区单次核酸检测记录 已检测
    IPage<PersonalInfoRespDTO> detectionPeople(Page<T> p, Long detectionId, Long communityId, String name);

    //小区单次核酸检测记录 阳性
    IPage<PersonalInfoRespDTO> yangPeople(Page<T> p, Long detectionId, Long communityId, String name,Integer status);

    //密接人员信息查询
    List<PersonalInfoRespDTO> closeContactInfo(Long userId,Long detectionId);

    List<CommunityDTO> getCommunityList(Long userId);

    Integer getIfTrue(Long detectionId, long userId);
}
